using System;
using System.Collections.Generic;
using System.Text;
using MacomberMap.Common.Types;
using MacomberMap.Common.User_Interfaces.Components;

namespace MacomberMap.Common.Components
{
    /// <summary>
    /// This class contains contingency definitions
    /// </summary>
    [MM_Serializable_Target(MM_Serializable_Target.enumTargetType.TypeCollection)]
    public class MM_Contingency: MM_Element
    {
        #region Variable declarations
        /// <summary>The long name of the contingency definition</summary>
        [MM_Serializable_Target(MM_Serializable_Target.enumTargetType.TypeCollection)]
        public String LongName;

        /// <summary>The elements involved in the contingency definition</summary>
        [MM_Serializable_Target(MM_Serializable_Target.enumTargetType.TypeCollection)]        
        public MM_Element[] Elements;
        #endregion

        #region Initialization
        /// <summary>
        /// Initialize a new contiengency
        /// </summary>
        /// <param name="ContingencyName">The name of the contingency</param>
        /// <param name="ContingencyDescription">The description of the contingency</param>
        public MM_Contingency(String ContingencyName, String ContingencyDescription)
        {
            this.Name = ContingencyName;
            this.LongName = ContingencyDescription;
            this.ElemType = MM_Overall_Display.ElemTypes["Contingency"];
        }

        /// <summary>
        /// Initialize a new contiengency
        /// </summary>
        public MM_Contingency()
        {
            this.ElemType = MM_Overall_Display.ElemTypes["Contingency"];
        }
        #endregion
    }
}
